package com.dianping.cat.core.config;

import java.util.List;
import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class ConfigDao
  extends AbstractDao {
/* 11 */   public Config createLocal() { return new Config(); }





/* 17 */   public int deleteByPK(Config proto) throws DalException { return getQueryEngine().deleteSingle(ConfigEntity.DELETE_BY_PK, proto); }



  
  public List<Config> findAllConfig(Readset<Config> readset) throws DalException {
/* 23 */     Config proto = new Config();

/* 25 */     return getQueryEngine().queryMultiple(ConfigEntity.FIND_ALL_CONFIG, proto, readset);
  }





  
  public Config findByPK(int keyId, Readset<Config> readset) throws DalException {
/* 34 */     Config proto = new Config();

/* 36 */     proto.setKeyId(keyId);

/* 38 */     return (Config)getQueryEngine().querySingle(ConfigEntity.FIND_BY_PK, proto, readset);
  }





  
  public Config findByName(String name, Readset<Config> readset) throws DalException {
/* 47 */     Config proto = new Config();

/* 49 */     proto.setName(name);

/* 51 */     return (Config)getQueryEngine().querySingle(ConfigEntity.FIND_BY_NAME, proto, readset);
  }







  
/* 61 */   protected Class<?>[] getEntityClasses() { return new Class[] { ConfigEntity.class }; }



/* 65 */   public int insert(Config proto) throws DalException { return getQueryEngine().insertSingle(ConfigEntity.INSERT, proto); }





/* 71 */   public int updateByPK(Config proto, Updateset<Config> updateset) throws DalException { return getQueryEngine().updateSingle(ConfigEntity.UPDATE_BY_PK, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/lib/cat-core-3.0.0.jar!/com/dianping/cat/core/config/ConfigDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */